home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
GUSI
/
GUSISIOW.cp
< prev
next >
Wrap
Text File
|
1993-08-10
|
1KB
|
87 lines
/*********************************************************************
Project : GUSI - Grand Unified Socket Interface
File : GUSISIOW.cp - Update & activate SIOW window
Author : Matthias Neeracher
Started : 17Apr92 Language : MPW C/C++
27Apr92 MN C++ version
18Dec92 MN _DoActivate incorrectly depends on current port
Last : 18Dec92
*********************************************************************/
#include "GUSI_P.h"
#include <Events.h>
#include <Windows.h>
static void GUSISIOWActivate(EventRecord * ev);
static void GUSISIOWUpdate(EventRecord * ev);
static void GUSISIOWSusRes(EventRecord * ev);
GUSIEvtHandler GUSISIOWEvents[] = {
nil,
nil,
nil,
nil,
nil,
nil,
GUSISIOWUpdate,
nil,
GUSISIOWActivate,
nil,
nil,
nil,
nil,
nil,
nil,
GUSISIOWSusRes,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
};
extern "C" void _DoActivate(WindowPtr win, int activate);
extern "C" void _DoUpdate(WindowPtr win);
static void GUSISIOWActivate(EventRecord * ev)
{
GrafPtr port;
GetPort(&port);
if ((WindowPtr) ev->message)
SetPort((WindowPtr) ev->message);
_DoActivate((WindowPtr) ev->message, ev->modifiers & activeFlag);
SetPort(port);
}
static void GUSISIOWUpdate(EventRecord * ev)
{
_DoUpdate((WindowPtr) ev->message);
}
static void GUSISIOWSusRes(EventRecord * ev)
{ GrafPtr port;
GetPort(&port);
SetPort(FrontWindow());
_DoActivate(FrontWindow(), (int) ev->message & 1);
SetPort(port);
}